package com.oritsh.dicom.constant;

import java.util.EnumSet;

import org.dcm4che.data.UID;
import org.dcm4che.net.QueryOption;

public enum CFindInformationModel {
    PatientRoot(UID.PatientRootQueryRetrieveInformationModelFIND, "STUDY"),
    StudyRoot(UID.StudyRootQueryRetrieveInformationModelFIND, "STUDY"),
    PatientStudyOnly(UID.PatientStudyOnlyQueryRetrieveInformationModelFINDRetired,"STUDY"),
    MWL(UID.ModalityWorklistInformationModelFIND, null),
    UPSPull(UID.UnifiedProcedureStepPullSOPClass, null),
    UPSWatch(UID.UnifiedProcedureStepWatchSOPClass, null),
    HangingProtocol(UID.HangingProtocolInformationModelFIND, null),
    ColorPalette(UID.ColorPaletteInformationModelFIND, null);

    public final String cuid;
    public final String level;

    CFindInformationModel(String cuid, String level) {
        this.cuid = cuid;
        this.level = level;

    }

    public void adjustQueryOptions(EnumSet<QueryOption> queryOptions) {
        if (level == null) {
            queryOptions.add(QueryOption.RELATIONAL);
            queryOptions.add(QueryOption.DATETIME);
        }
    }
}
